home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / FinderMenu ƒ / <FinderMenu> / FinderMenuInterface.c next >
Encoding:
C/C++ Source or Header  |  1995-09-10  |  750 b   |  37 lines  |  [TEXT/KAHL]

  1. #pragma once
  2.  
  3. /*
  4.  * (C) 1992 SixxHeads Software
  5.  * (C) 1992 Berkeley Systems
  6.  * All Rights Reserved
  7.  *
  8.  * This file should be Added to any application that wants to Insert
  9.  * menus into the Finder. 
  10.  *
  11.  * You must call FMInit (which returns the first menu ID you should use)
  12.  * before calling any other FinderMenu procedure.
  13.  *
  14.  * System 7 Only.
  15.  * 
  16.  * <Revision History>
  17.  *        04/28/92 smz Created.
  18.  */
  19.  
  20. #include "FinderMenuInterface.h"
  21. #include <GestaltEqu.h>
  22.  
  23. /*
  24.  * Globals
  25.  */
  26. FMDispatchProc    theDispatchProc;
  27. OSType             theCreatorID;
  28.  
  29. short FMInit()
  30. {
  31.     theCreatorID = GetProcessCreator();
  32.     if (Gestalt(cGetFinderMenuProc, (long *) &theDispatchProc) != noErr)
  33.         return eInitNotInstalled;
  34.  
  35.     return (*theDispatchProc)(eInitFinderMenu, theCreatorID);
  36. }
  37.